-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uid_of_path can use the decl_id if shapes fail #1700
Conversation
I don't know how best to test this within the merlin testsuite; advice welcome. |
Thanks for having a look. For testing you should be able to reproduce your script in a single-file cram test by cd-ing and calling the compiler manually. (Also, it seems that two other tests are affected by your changes: |
I will have a look! |
I started looking at this and there is two different kinds of fall backing:
I'm wondering whether these two fallbacks lead to the same loc in which case we could only rely only on the second one which doesn't require the cmt files. I will try to rework that mechanism and make it clearer! |
These two fallbacks will lead to the same location but the |
Yes, if finding the definition's uid failed because of a missing |
Sorry, to be clear, we want to fall back to the declaration's |
Yes, that's what I meant 🙂 |
I pushed a commit that should fix the issue with all tests passing. @goldfirere can you check that it still fix your issue ? |
6fdc457
to
d9b7785
Compare
@goldfirere I added a test and force pushed to illustrate the impact of these changes. There is still an issue though: when both files have exactly the same content, they have the same digest, we should probably salt the digest... |
FWIW the remaining issue a long-standing one that thankfully doesn't occur very often |
Make test more compatible (`pushd` is bash only)
locate: fallback after failing to load the uid_to_loc table (or if there is no appropriate entre in the table)
ba6540c
to
1114222
Compare
from goldfirere/fallback-to-decl_uid
Fixes #1699. Written with direction from @lpw25.